#!/bin/sh
dir="/root/logout"
user="20163106127"
passwd="123659"
dir="logout"
if [ ! -d "$dir" ]; then
	mkdir $dir
fi
#logout
logout(){
wget -qP $dir --post-data="action=logout&username=201631062127@yd&password=123659&ac_id=1&ajax=1" http://172.16.245.50/include/auth_action.php
res=`cat $dir/auth_action.php`
rm -f $dir/auth_action.php
if [ "$res" == "网络已断开" ]; then
	logger "edu logout:" "$res"
	echo "$res" 
	sleep 5
	/root/login.sh
else
	echo "can not logout: $res"
	logger "edu logout" "$res"
	#/root/login.sh
fi
}

logout
